#ifndef __SUM_ENTITIES_H__
#define __SUM_ENTITIES_H__

#include <stdint.h>
#include <memory.h>
#include <vector>
#define STR_LEN 50
using std::vector;

class Area {
public:
    uint32_t id;
    char name[STR_LEN];
    int32_t camp;
public:
    Area():id(0),camp(0)
    {
        memset(name,0,sizeof(name));
    }
};

class Sensor {
public:
    uint32_t id;
    char name[STR_LEN];
    uint32_t type_id;
    uint32_t state;
    uint32_t work_mode;
    uint32_t detection_cnt;
    vector<uint32_t> detections;
public:
    Sensor():id(0),type_id(0),state(0),work_mode(0),detection_cnt(0)
    {
        memset(name, 0, sizeof(name));
        detections.clear();
    }
};

class AirCraft
{
public:
    uint32_t id;
    char name[STR_LEN];
    int32_t type_id;
    uint32_t camp;
    uint32_t target_id;
    uint32_t state;
    uint32_t life;
    double lon;
    double lat;
    double alt;
    vector<Sensor*> sensors;
public:
    AirCraft():id(0), type_id(0),camp(0),target_id(0),state(0),life(0),lon(0),lat(0),alt(0)
    {
        memset(name, 0, sizeof(name));
        sensors.clear();
    }
};

class Entities
{
public:
    uint32_t aircraft_cnt;
    uint32_t area_cnt;
    uint32_t scenario_time;
    vector<AirCraft*> aircrafts;
    vector<Area*> areas;
};

class Task 
{
public:
    uint32_t id;
    uint32_t target_id;
    uint32_t action_id;
};
class Command 
{
public:
    uint32_t command_type;
    uint32_t speedup;
    uint32_t step_time;
    vector<Task> tasks;
};

#endif 
